﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entity;
using DAL;

namespace BUL
{
    public class NewsBul
    {
        private NewsDal dal = new NewsDal();

        public List<News> News_GetById(string Id)
        {
            return dal.News_GetById(Id);
        }

        public List<News> News_Search(string Name, string Tag, string Title,string Date)
        {
            return dal.News_Search(Name,Tag,Title,Date);
        }

        public List<News> News_GetByHome(string GroupNewsId, string lang)
        {
            return dal.News_GetByHome(GroupNewsId, lang);
        }


        public List<News> News_GetByTop(string Top, string Where, string Order)
        {
            return dal.News_GetByTop(Top, Where, Order);
        }


        public List<News> News_GetByKMHangKhong(string lang)
        {
            return dal.News_GetByKMHangKhong(lang);
        }
        public List<News> News_GetByGroupNewsId(string GroupNewsId)
        { 
            return dal.News_GetByGroupNewsId(GroupNewsId);
        }


        public List<News> News_GetByNewsRelated(string newId, string grnId, string Lang)
        {
            return dal.News_GetByNewsRelated(newId, grnId, Lang);
        }


        public List<News> News_GetByNewsOther(string newId, string grnId, string Lang)
        {
            return dal.News_GetByNewsOther(newId, grnId, Lang);
        }


        public List<News> News_GetByGroupNewsID_Date_Top(string grnid, string date, string top)
        {
            return dal.News_GetByGroupNewsID_Date_Top(grnid, date, top);
        }


        public List<News> News_GetByAll(string Lang)
        {
            return dal.News_GetByAll(Lang);
        }


        public List<News> News_GetBySpa(string Lang)
        {
            List<News> list = new List<News>();
            list = dal.News_GetByAll(Lang);
            return list.FindAll(delegate(News obj)
                                    {
                                        return obj.Check2 == "1";
                                    });
        }


        public List<News> News_GetByDulich(string Lang)
        {
            return dal.News_GetByDulich(Lang);
        }


        public List<News> News_GetByDulich3(string Lang)
        {
            return dal.News_GetByDulich3(Lang);
        }


        public List<News> News_Paging(string CurentPage, string PageSize, string Lang, string Level)
        {
            return dal.News_Paging(CurentPage, PageSize, Lang, Level);
        }


        public bool News_Insert(News data)
        {
            return dal.News_Insert(data);
        }


        public bool News_Update(News data)
        {
            return dal.News_Update(data);
        }


        public bool News_Delete(string Id)
        {
            return dal.News_Delete(Id);
        }

    }
}
